package com.handtransaction.controller;

import com.handtransaction.entity.Category;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author YAO
 * @create 2021-03-29 0:06
 */

/**
 * 专门用于处理各种页面的跳转
 */
@Controller
public class TransController {

    @RequestMapping(value = "gotoresone",method = RequestMethod.GET)
    public String gotores1(){
        return "user/register1";
    }

    @RequestMapping(value = "gotologinone",method = RequestMethod.GET)
    public String gotologin1(){
        return "user/login";
    }

    @RequestMapping(value = "gotoindex1",method = RequestMethod.GET)
    public String gotoindex1(){
        return "redirect:/index1.jsp";
    }

    @RequestMapping(value = "gotouserpub",method = RequestMethod.GET)
    public String gotouserpub(){
        return "user/userPublish";
    }

    @RequestMapping(value = "gotoordermanage",method = RequestMethod.GET)
    public String gotoordman(){
        return "order/ordermanage";
    }

    @RequestMapping(value = "gotogoodsadd",method = RequestMethod.GET)
    public String gotogoodsadd(){
        return "goods/goodsAdd";
    }

    @RequestMapping(value = "gotouInfo",method = RequestMethod.GET)
    public String gotouserinfo(){
        return "user/userInfo1";
    }

    @RequestMapping(value = "gotoRgm",method = RequestMethod.GET)
    public String gotoRgm(){
        return "root/Rgoodsmanage";
    }

    @RequestMapping(value = "gotoRum",method = RequestMethod.GET)
    public String gotoRum(){
        return "root/Rusermanage";
    }

    @RequestMapping(value = "gotoGoodsDet",method = RequestMethod.GET)
    public String gotoGoodsDet(){
        return "goods/detail";
    }

    @RequestMapping(value = "toupload",method = RequestMethod.GET)
    public String gotoupload(){
        return "common/Fileupload";
    }

    @RequestMapping(value = "gotosucc",method = RequestMethod.POST)
    public String gotosucc(){
        return "common/succ";
    }

    //管理员点击“管理类别”，跳转到展示全部类别页面
    @RequestMapping(value = "gotoCategoryPage",method = RequestMethod.GET)
    public String gotoCategory(){
        return "category/showAllCategory";
    }

    //点击【新增类别】，跳转到【类别新增页面】
    @RequestMapping(value = "gotoAddCategoryPage",method = RequestMethod.GET)
    public String gotoAddCategory(){
        return "category/addCategory";
    }

    //跳转管理员登录页面
    @RequestMapping(value = "gotoAdminLoginPage",method = RequestMethod.GET)
    public String gotoAdminLogin(){return "admin/adminLogin";}

    @RequestMapping(value = "gotoeditorder",method = RequestMethod.GET)
    public String gotoedit(){
        return "ensureOrder";
    }

    //管理员进入后台
    @RequestMapping(value = "gotoAdminConsole" , method = RequestMethod.GET)
    public String gotoAdminConsole(){return "admin/adminConsole";}

}


